package com.douyu.data.redis.controller;

import com.douyu.data.redis.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "redis")
public class RedisController {
    @Autowired
    private RedisService redisService;

    @GetMapping(value = "key")
    public String getKV(@RequestParam("key") String key){
        return redisService.KVGet(key);
    }
}
